<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page contentType="text/html; charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <title>学生信息列表</title>
    <style>
        table {
            border-collapse: collapse;
            width: 100%;
            max-width: 800px;
            margin: 20px auto;
        }
        th, td {
            border: 1px solid #ddd;
            padding: 8px 12px;
            text-align: left;
        }
        th {
            background-color: #f2f2f2;
            font-weight: bold;
        }
        tr:nth-child(even) {
            background-color: #f9f9f9;
        }
        tr:hover {
            background-color: #f5f5f5;
        }
    </style>
</head>
<body>
<table>
    <tr>
        <th>姓名</th>
        <th>性别</th>
        <th>年龄</th>
        <th>生日</th>
    </tr>
    <c:forEach items="${requestScope.studentList}" var="stu">
        <tr>
            <td>${stu.name}</td>
            <td>${stu.gender}</td>
            <td>${stu.age}</td>
            <td>
                <fmt:setLocale value="zh_CN"/>
                <fmt:formatDate value="${stu.birthday}" pattern="yyyy年MM月dd日"/>
            </td>
        </tr>
    </c:forEach>
</table>
</body>
</html>
